#include <gmlib/sm9/internal/sm9_field.h>
#include <stdexcept>
#include <cstring>

using namespace sm9::internal;

void test_sm9_fp_sqr()
{
    sm9_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x2b,0x12,0x2c,0xaa,0x8a,0xf5,0xda,0x64,0x62,0x75,0xa6,0xaf,0xc9,0x48,0xd5,0x8c,0xaa,0xb8,0x68,0xa0,0x6d,0xe8,0x52,0x7f,0x0f,0x49,0xf9,0x9f,0xb6,0x63,0x6a,0x25};
    static std::uint8_t c0[32] = {0xa0,0x78,0xb9,0x06,0x2e,0x24,0xf1,0xd1,0x6a,0x9f,0x51,0x44,0x2e,0xa6,0x56,0x09,0x5c,0x35,0x7d,0xeb,0x16,0x00,0xb7,0x53,0xa8,0x6b,0x31,0xd7,0x5c,0x2e,0xee,0x1f};
    sm9_fp_from_bytes(a, a0);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a1[32] = {0xac,0x3d,0x83,0x4e,0xd2,0xc7,0x0b,0x41,0xe9,0xeb,0x53,0x9b,0x18,0x4b,0x26,0x14,0xf2,0xab,0xf5,0xf3,0x9e,0x57,0x1a,0x56,0xb0,0x49,0x8d,0xba,0xfd,0xa8,0xf3,0x42};
    static std::uint8_t c1[32] = {0x98,0x2e,0xaf,0xac,0x16,0x78,0x05,0x6e,0x34,0x12,0x5d,0x40,0x51,0x21,0x75,0x35,0x00,0x96,0x33,0x6e,0x98,0x2b,0xfd,0x3b,0x24,0xaf,0xa8,0x09,0xc4,0xfd,0xae,0x6f};
    sm9_fp_from_bytes(a, a1);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a2[32] = {0x2c,0xcb,0xfe,0x53,0x06,0x5e,0x16,0xeb,0x47,0xf2,0xa1,0x01,0xa2,0xe3,0xc0,0x2f,0x67,0x2e,0xca,0x79,0x57,0xef,0x28,0xe1,0x94,0x19,0x1c,0x85,0x0b,0x42,0xa2,0x8b};
    static std::uint8_t c2[32] = {0xad,0xba,0x1a,0x2e,0xdc,0x14,0x7d,0x11,0x0c,0x5f,0x69,0x2f,0xfa,0x10,0x6a,0xd5,0xf3,0x41,0xe7,0x18,0x0d,0x8e,0x65,0x27,0x19,0xba,0xd1,0x98,0x3c,0x98,0x77,0xe0};
    sm9_fp_from_bytes(a, a2);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a3[32] = {0x2b,0x76,0x12,0xb7,0x18,0xca,0xc6,0x86,0x4e,0xf4,0x74,0xed,0xe8,0x83,0xf8,0x3e,0x9d,0xb0,0x78,0xf9,0x49,0x3b,0xe1,0xbf,0xd2,0x7f,0x99,0xe3,0x29,0x9b,0x62,0x0c};
    static std::uint8_t c3[32] = {0x3d,0xad,0x0b,0xbb,0xe1,0x53,0x32,0xab,0x2a,0x91,0xa7,0xe3,0xb4,0x0f,0x24,0x2c,0x69,0x63,0xe6,0x03,0x7c,0x9a,0xf1,0xc3,0xc0,0x80,0xcb,0xde,0xac,0x48,0x05,0x10};
    sm9_fp_from_bytes(a, a3);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a4[32] = {0x06,0x00,0x84,0x3d,0xa0,0xb5,0x3b,0x3f,0xc9,0xcd,0x44,0x17,0xf2,0x28,0x6b,0x7d,0xe8,0xd6,0x8e,0x8a,0x82,0xfe,0xa2,0xbe,0x3d,0x8c,0x95,0x4a,0x27,0xcf,0xbe,0xc1};
    static std::uint8_t c4[32] = {0xb0,0x50,0x6f,0xd7,0xd0,0x60,0x34,0x0f,0xde,0x7c,0xce,0x72,0x37,0x82,0x67,0x64,0x4c,0x2a,0x94,0x14,0x65,0xe5,0x32,0x13,0xc5,0x2f,0x9f,0x83,0xa2,0xb9,0xfb,0x8a};
    sm9_fp_from_bytes(a, a4);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a5[32] = {0xae,0x65,0x17,0xf7,0x85,0x4f,0xf6,0x89,0xcc,0xcc,0xde,0x8f,0xbc,0x4a,0xf6,0x40,0x6f,0x9c,0x36,0x42,0x35,0xf8,0x46,0xe8,0x08,0xb5,0x8d,0x66,0x06,0xb5,0x2b,0x03};
    static std::uint8_t c5[32] = {0x76,0xd8,0x9d,0x34,0xfd,0xeb,0x73,0xe5,0xeb,0x0f,0x1a,0x02,0xf9,0xcc,0xa7,0x36,0xe5,0xed,0xd1,0x5d,0x01,0x7e,0xfb,0xeb,0x77,0x82,0x40,0x56,0xea,0x4e,0xc9,0xd2};
    sm9_fp_from_bytes(a, a5);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a6[32] = {0x2b,0x20,0x37,0x4a,0x44,0x27,0x33,0x9f,0x6e,0x73,0xbf,0x8f,0x96,0x7d,0x2e,0x62,0x19,0x4d,0x2b,0x96,0xcc,0xce,0x92,0xa9,0x9a,0xa6,0xf5,0xa6,0x39,0x04,0xde,0x25};
    static std::uint8_t c6[32] = {0x2a,0x78,0x2c,0x12,0x59,0x0e,0x05,0x06,0xdd,0x23,0xde,0x39,0x36,0x6b,0xa7,0xa9,0x97,0x5d,0x8e,0xe4,0x7b,0xb0,0x1d,0x29,0x42,0xe0,0x37,0x2e,0xcc,0x12,0xb3,0x9e};
    sm9_fp_from_bytes(a, a6);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a7[32] = {0x12,0xe4,0x1c,0xcc,0x04,0x06,0xe9,0xe6,0x61,0x54,0x32,0x05,0xd5,0xf1,0x96,0x19,0xbe,0xd0,0x36,0xef,0x43,0xca,0xbf,0x32,0x96,0x56,0x7f,0x17,0x97,0xe7,0xe0,0x3b};
    static std::uint8_t c7[32] = {0x3b,0x58,0x76,0x48,0x1d,0xde,0x2b,0xd1,0x30,0xe9,0x73,0xef,0x1e,0xa2,0x6d,0x67,0xa7,0x24,0x74,0x18,0x86,0x80,0x03,0xff,0x28,0x13,0x09,0x6a,0x42,0xd2,0x40,0x74};
    sm9_fp_from_bytes(a, a7);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a8[32] = {0x42,0x79,0x9b,0xf9,0xd5,0x84,0xd0,0xb1,0xf8,0xc1,0x58,0xdf,0x5d,0x48,0x6d,0x30,0x39,0x00,0xe9,0xdd,0xc2,0x66,0xbc,0x32,0xd5,0x2e,0x18,0xc4,0x7b,0xca,0x68,0xf8};
    static std::uint8_t c8[32] = {0x0a,0x6a,0x58,0x5f,0x22,0x31,0x32,0x08,0x4e,0x06,0x12,0xce,0x73,0x43,0x29,0x8f,0x45,0x3b,0x93,0x6c,0x57,0xc2,0x36,0xd6,0x93,0xbc,0xf5,0x0e,0x7b,0xfb,0x98,0x16};
    sm9_fp_from_bytes(a, a8);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a9[32] = {0x3d,0x91,0xc4,0xfa,0x9c,0xcb,0x01,0x1a,0x1d,0x5f,0x8e,0xb0,0xf5,0xef,0x5a,0xe4,0x13,0x8e,0x24,0x24,0x35,0x1c,0x42,0xb0,0xa2,0x6a,0xbd,0x06,0x72,0xd5,0xa6,0x85};
    static std::uint8_t c9[32] = {0x89,0x84,0x79,0xca,0x34,0xcb,0x59,0x6f,0x40,0x0c,0x28,0x5a,0x75,0x17,0x71,0x07,0x6f,0xc6,0x3b,0xd1,0x07,0x15,0xd0,0x84,0x93,0x72,0x1c,0x27,0x63,0x0c,0xdf,0x2e};
    sm9_fp_from_bytes(a, a9);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a10[32] = {0x51,0x03,0xd9,0x5b,0x03,0x5f,0x25,0x31,0x05,0x24,0x88,0x29,0xa4,0xe1,0x05,0x99,0x1f,0x09,0x24,0x75,0x3f,0x4d,0x73,0x59,0x02,0x70,0x2c,0xc2,0xa2,0x57,0x8b,0x6c};
    static std::uint8_t c10[32] = {0x6e,0x49,0x15,0x96,0xb8,0xbe,0xe8,0x09,0xde,0x53,0x86,0xc8,0xdd,0x49,0x14,0x86,0x88,0x06,0xf0,0xb3,0xea,0xc1,0x33,0x64,0x65,0xbf,0x4b,0xd0,0xdf,0x43,0xe7,0xf3};
    sm9_fp_from_bytes(a, a10);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a11[32] = {0x2b,0xde,0x30,0x46,0x61,0x4e,0x58,0x88,0xaf,0x94,0x97,0xcc,0x23,0x11,0x4e,0xaf,0x02,0x22,0x8a,0x2d,0x1b,0x79,0x2d,0xa3,0xd4,0xe7,0x93,0xc9,0x91,0x2f,0x41,0xc3};
    static std::uint8_t c11[32] = {0x1a,0x80,0x76,0xe0,0x85,0x65,0x13,0x08,0x2f,0x9a,0xd2,0x9e,0x0b,0x92,0xaf,0xa5,0xf4,0xce,0x87,0xd8,0xfb,0xb0,0xb3,0xf3,0xef,0x68,0xe4,0x09,0xa8,0xf7,0x8f,0x69};
    sm9_fp_from_bytes(a, a11);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a12[32] = {0x94,0xf3,0xe0,0x13,0xaa,0xb9,0x56,0x23,0xba,0xb7,0xbc,0x5f,0xf8,0x2f,0x6b,0xab,0xc3,0xf0,0xe2,0x05,0x6c,0x0d,0x9a,0x51,0x67,0x9b,0x57,0xad,0xd0,0x04,0xd4,0x26};
    static std::uint8_t c12[32] = {0x75,0xa3,0xb0,0x01,0x0c,0x9c,0x5d,0x8b,0xb9,0x4c,0xd0,0xc9,0x78,0x5b,0xc9,0x17,0x05,0x27,0x31,0x6b,0x06,0xb6,0x9d,0xfe,0x0d,0x34,0x50,0x4d,0x4f,0x02,0xfb,0x38};
    sm9_fp_from_bytes(a, a12);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a13[32] = {0x1c,0xec,0x04,0xfd,0xdc,0x12,0x07,0x15,0x6c,0x0f,0x95,0x75,0x4e,0x80,0x56,0xd0,0x0c,0x8c,0x80,0x03,0x3f,0xd2,0x29,0xd8,0x56,0x8c,0x9e,0x42,0x34,0x92,0x23,0x5f};
    static std::uint8_t c13[32] = {0x71,0x4c,0xf7,0x4c,0xb3,0xed,0xc4,0xa9,0x8b,0x60,0x70,0x0e,0x7d,0x69,0x29,0xfc,0xbb,0x18,0x5f,0x61,0x29,0x99,0x97,0xb2,0xc4,0x1b,0x34,0x55,0x5c,0x5f,0xc4,0xbe};
    sm9_fp_from_bytes(a, a13);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a14[32] = {0xb4,0x97,0x4f,0x25,0x47,0x95,0x94,0x4e,0xab,0x5e,0x47,0xb4,0x7d,0x92,0x36,0x44,0x52,0x2f,0xde,0x6b,0x45,0xf5,0x03,0xfe,0x62,0x97,0x64,0x70,0x6f,0x15,0xba,0x61};
    static std::uint8_t c14[32] = {0x66,0x73,0x7d,0x12,0x8f,0xb6,0xa7,0xf4,0x88,0xb3,0x10,0x31,0xf2,0xeb,0x99,0x21,0xb1,0x97,0xe4,0x83,0x3c,0xc2,0x56,0xd7,0xde,0xce,0xcb,0xaf,0x01,0x97,0xbe,0xc1};
    sm9_fp_from_bytes(a, a14);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a15[32] = {0x1c,0xc0,0x25,0x79,0x7c,0x16,0xef,0x01,0x20,0x9c,0xdb,0x33,0xd0,0x0a,0x94,0xbe,0x2d,0xb0,0xfe,0x5b,0x4d,0xbd,0x79,0xdc,0xc1,0x66,0x73,0x53,0xbe,0xe0,0x7d,0xb3};
    static std::uint8_t c15[32] = {0x54,0xcf,0xcb,0x54,0xd3,0x0e,0x5b,0xbb,0x0b,0xe7,0x82,0x2a,0xe2,0x17,0xc4,0x7c,0x91,0xaf,0x58,0x22,0x1d,0x58,0x73,0x7c,0xd0,0xf1,0x33,0x22,0x6b,0xc3,0x8c,0xdb};
    sm9_fp_from_bytes(a, a15);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a16[32] = {0x7c,0x3e,0x0f,0x16,0x8b,0xd1,0xba,0x4a,0x80,0x02,0xae,0x33,0x3e,0xa1,0xef,0x0f,0xbb,0x50,0xef,0x0e,0xd0,0xc5,0xcf,0xa1,0x2d,0xe7,0x71,0xc9,0x79,0xa8,0xaf,0x88};
    static std::uint8_t c16[32] = {0x24,0x67,0xf5,0x8f,0x0a,0x55,0x18,0x9a,0x83,0xbe,0xf7,0x90,0x28,0xaa,0xb0,0x88,0x04,0x00,0xd7,0x89,0x46,0x52,0x44,0xe0,0xc3,0xd8,0x90,0x74,0x2e,0xf9,0x8e,0x09};
    sm9_fp_from_bytes(a, a16);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a17[32] = {0x2f,0x5e,0x3e,0x64,0x1b,0xa2,0x7d,0x93,0x3e,0x10,0x57,0x54,0x48,0x82,0x56,0xac,0xd9,0x14,0x7b,0xb2,0xd8,0x1f,0xb0,0xbb,0x33,0x43,0xe5,0xdb,0xdb,0x82,0xc8,0xe7};
    static std::uint8_t c17[32] = {0x02,0x73,0xe6,0xc6,0x41,0xe4,0x81,0x84,0x8f,0x65,0x4b,0xf1,0x4c,0x19,0x4f,0x0e,0xc4,0x09,0xa2,0x09,0xef,0x86,0xa4,0x02,0x7c,0x00,0x7e,0x52,0x18,0x03,0xb2,0x5a};
    sm9_fp_from_bytes(a, a17);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a18[32] = {0x5a,0x1a,0xcb,0x45,0x3c,0x2a,0x62,0x91,0xaf,0xc6,0x0f,0xfd,0x2c,0x16,0x6d,0xd8,0xaa,0xb3,0xf0,0x7c,0xe4,0xca,0x58,0xba,0xe7,0x8a,0x16,0x69,0x76,0x69,0xbf,0x52};
    static std::uint8_t c18[32] = {0x2d,0x65,0x7f,0x91,0xf0,0x6f,0xcc,0x04,0x7d,0x66,0xeb,0xe1,0x3b,0x9e,0xe7,0x37,0x58,0x0d,0xe5,0x2a,0x50,0x27,0x17,0x53,0x08,0xdc,0x27,0x49,0x4e,0x3f,0xe4,0x32};
    sm9_fp_from_bytes(a, a18);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a19[32] = {0x38,0x9c,0xa4,0xec,0xc5,0xca,0x5e,0xcd,0x43,0x36,0x1e,0x74,0x3c,0xce,0x69,0xd7,0x44,0x7d,0x5c,0xb7,0x4f,0x1d,0xbe,0x2b,0xdb,0x0e,0x59,0x30,0xab,0xa7,0x87,0xd9};
    static std::uint8_t c19[32] = {0x06,0x1b,0x21,0xa1,0x09,0xd6,0x0b,0x79,0x3a,0x3c,0x16,0x71,0xfb,0x29,0xa2,0x7e,0x4a,0xb9,0x8a,0x50,0x72,0xcf,0x3a,0x63,0x8d,0x8c,0xff,0xd8,0x78,0xae,0x24,0xb9};
    sm9_fp_from_bytes(a, a19);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a20[32] = {0x41,0x21,0xd3,0x5c,0x6e,0x52,0x3f,0xdb,0xdd,0x1e,0xc2,0x74,0x4b,0x1a,0x04,0x58,0x0a,0x71,0x51,0x40,0x3e,0x17,0xc4,0x8b,0x93,0x5d,0x90,0xa2,0xcb,0x57,0xe7,0xe5};
    static std::uint8_t c20[32] = {0x83,0xf7,0xd8,0x7e,0x0a,0x08,0x05,0x75,0x31,0x63,0x75,0x5f,0x03,0x9f,0x8f,0x30,0xd2,0x3d,0xd7,0x94,0x65,0x82,0x98,0xe1,0x7b,0x7b,0x66,0xe6,0xff,0x09,0x16,0x1b};
    sm9_fp_from_bytes(a, a20);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a21[32] = {0x0d,0xc2,0x9c,0xe1,0xb8,0xba,0x27,0xf6,0x79,0xae,0x8e,0xc8,0x55,0xe3,0x88,0x3c,0x31,0xee,0x92,0x22,0xdc,0x1a,0xc9,0xee,0x40,0xc2,0x46,0x77,0x24,0x5c,0x0e,0x5d};
    static std::uint8_t c21[32] = {0x32,0x38,0x3d,0x02,0xc1,0x84,0x0c,0x2d,0x00,0xf5,0x97,0x69,0x7e,0xfb,0x0e,0xc2,0xbb,0x12,0xef,0xe4,0x46,0x60,0xce,0x2f,0xa8,0x8f,0x09,0xe3,0x42,0xea,0x25,0x33};
    sm9_fp_from_bytes(a, a21);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a22[32] = {0x77,0x87,0x7e,0x20,0xd4,0x2e,0xe4,0xf4,0x47,0xa2,0xa1,0x7c,0x7b,0x7c,0xde,0x78,0xf8,0x9a,0x55,0x12,0x8c,0xaa,0x77,0x5a,0x7b,0xe0,0x4e,0x06,0x0e,0x5f,0x44,0x16};
    static std::uint8_t c22[32] = {0x80,0xf4,0x08,0xfb,0x56,0x3c,0x90,0x20,0x38,0x95,0x9b,0xe6,0xef,0x18,0xd7,0xa7,0xab,0xa9,0x0a,0x8b,0x1d,0x87,0x57,0x7a,0x4b,0xe7,0x87,0x7f,0x21,0x9e,0x2a,0x8e};
    sm9_fp_from_bytes(a, a22);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a23[32] = {0xb2,0xca,0x0f,0x6b,0x84,0xe4,0xdd,0x62,0x34,0xc6,0xc4,0x89,0xd0,0xc7,0xff,0x29,0xfd,0x82,0x5e,0x29,0xf8,0xc9,0xce,0xf8,0xe5,0x1c,0xf0,0xa0,0xd4,0xd0,0x9f,0x6b};
    static std::uint8_t c23[32] = {0x00,0x10,0x7f,0xba,0x1f,0xdd,0xcc,0x38,0xe3,0xf3,0xdd,0x25,0x0c,0xf8,0xc3,0xae,0x89,0xe3,0x44,0xd1,0x65,0x7c,0x47,0x19,0x48,0x29,0xf9,0x26,0xc3,0x97,0x67,0xb3};
    sm9_fp_from_bytes(a, a23);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a24[32] = {0x0b,0xf0,0xb9,0x44,0xad,0x8d,0x34,0x07,0x30,0xd6,0x17,0x46,0xe5,0x6c,0xf9,0x0d,0xfe,0x36,0xaf,0xf2,0x30,0xf7,0x93,0xf3,0xc6,0xa5,0xc6,0xd5,0x8b,0x63,0xbc,0xdd};
    static std::uint8_t c24[32] = {0x5c,0xbe,0xe6,0xb4,0xc9,0x4c,0x49,0xc4,0x12,0x5f,0x60,0xce,0x71,0x0c,0xe9,0x25,0xb5,0xe5,0xa6,0x1b,0x25,0x94,0x8a,0x38,0x31,0x37,0x7f,0xb7,0x82,0x9e,0x5a,0xec};
    sm9_fp_from_bytes(a, a24);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a25[32] = {0x1d,0x0c,0x59,0x0a,0xc0,0xbd,0x6e,0x36,0xca,0x39,0xb0,0x09,0xbd,0xe0,0x9e,0xce,0xe5,0x35,0x57,0xf5,0xf8,0x9c,0xff,0x51,0x49,0x46,0xbe,0x3b,0x39,0x59,0xa2,0x1e};
    static std::uint8_t c25[32] = {0x65,0xc9,0x06,0xe9,0x95,0xa7,0x39,0x2e,0x4a,0xca,0x05,0xb2,0x99,0xf9,0x1c,0x1d,0x68,0xaa,0x3c,0x1d,0xfa,0x60,0x3f,0x42,0x62,0x31,0xc5,0xe0,0xc0,0x07,0x6b,0xe3};
    sm9_fp_from_bytes(a, a25);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a26[32] = {0x1e,0xc4,0x03,0xe8,0x52,0xd1,0xe8,0x78,0x43,0x18,0xcc,0x6d,0x96,0x62,0x0a,0x48,0x0c,0x72,0xa2,0x32,0x2a,0xc1,0x7c,0x07,0xe6,0x5d,0x3b,0x78,0x8d,0xc4,0x4c,0xb2};
    static std::uint8_t c26[32] = {0x01,0x0f,0x65,0x66,0xb6,0xca,0x62,0x89,0xb1,0xf2,0xc3,0x1b,0xeb,0x57,0x5b,0x4f,0x4a,0xb2,0x60,0xc1,0x68,0x3c,0xb3,0x31,0xb1,0x28,0x7f,0x1b,0xdd,0xa8,0x62,0x80};
    sm9_fp_from_bytes(a, a26);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a27[32] = {0x24,0xeb,0x14,0xf6,0xd7,0xdd,0x36,0x87,0xb0,0xb8,0xec,0x6c,0x9f,0x7f,0xec,0x7b,0x6e,0xe3,0x31,0x53,0x0a,0x80,0xfb,0xd5,0xe4,0xe1,0x97,0x72,0x3f,0x52,0xd0,0xad};
    static std::uint8_t c27[32] = {0x69,0xf7,0x7c,0x37,0x99,0x84,0x85,0xce,0xd9,0x65,0xcd,0x72,0xe3,0xef,0x0e,0xd7,0x9a,0x05,0x9d,0x9b,0x83,0x5e,0x42,0x9b,0x53,0x5d,0x4d,0x16,0x9f,0x6d,0x72,0xbc};
    sm9_fp_from_bytes(a, a27);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a28[32] = {0x10,0xfd,0x14,0x0a,0x69,0x0a,0x54,0x7d,0x5d,0xad,0x78,0x4c,0xf7,0xb7,0x43,0x4d,0xa3,0xec,0x7c,0x88,0x05,0x04,0x18,0x55,0xa1,0x6f,0x64,0x12,0x03,0xd8,0xf0,0xdc};
    static std::uint8_t c28[32] = {0x5a,0xb1,0x44,0xaf,0x9a,0xcf,0x6d,0xf0,0xd7,0x4a,0x3c,0x33,0x1d,0xaf,0xbd,0x8f,0xf8,0x8d,0xbb,0x13,0x21,0x85,0xf6,0x17,0x4b,0x72,0x92,0xb0,0x39,0xf8,0xa3,0x56};
    sm9_fp_from_bytes(a, a28);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a29[32] = {0x97,0x0c,0x21,0x1a,0x02,0xa0,0x4b,0xef,0x12,0x4c,0xef,0xef,0x18,0xad,0x4e,0x90,0xf0,0x79,0x22,0x62,0x47,0x23,0x29,0x3a,0x73,0x14,0x14,0x7e,0x7e,0xb1,0xbe,0xaa};
    static std::uint8_t c29[32] = {0x46,0x60,0x6f,0xfe,0x4c,0xbe,0xd8,0x58,0x2c,0x77,0x88,0xba,0x0e,0xce,0xcb,0x98,0x98,0x4a,0x8f,0x81,0x4e,0xc8,0x00,0x10,0x26,0x09,0x6f,0x9f,0xf6,0x76,0xf3,0xce};
    sm9_fp_from_bytes(a, a29);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a30[32] = {0x1d,0xa1,0x8c,0x4d,0x79,0x1b,0xad,0x0e,0x92,0xb1,0xe8,0x02,0x80,0x57,0x33,0x9b,0x51,0x34,0x86,0x46,0x10,0xb2,0xa0,0x25,0x5a,0xf7,0xc2,0x2f,0xf9,0x39,0xbe,0x70};
    static std::uint8_t c30[32] = {0x3b,0xba,0xe7,0x23,0xfc,0xea,0xa8,0x05,0x9f,0x4f,0x5d,0x34,0x15,0xc5,0x42,0xb4,0x9d,0x2e,0x5e,0x4b,0xc1,0x03,0x04,0x70,0xa3,0x7f,0x0b,0x40,0x74,0x86,0x4a,0xc2};
    sm9_fp_from_bytes(a, a30);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a31[32] = {0x4c,0xa7,0x6a,0xb5,0xf4,0x82,0x1d,0x68,0x33,0x43,0xae,0x7d,0x7f,0x13,0xf8,0xe2,0x19,0xf1,0x8a,0x0a,0xaf,0x68,0xdf,0xc7,0x03,0x0e,0x60,0x81,0xcd,0xdb,0x6b,0xb0};
    static std::uint8_t c31[32] = {0x5c,0xc8,0xcc,0x9c,0x37,0x4a,0xa2,0xa7,0x21,0x9a,0xc5,0x5e,0x11,0xa1,0x18,0x54,0x4c,0xf1,0xb6,0xf5,0xbb,0x6c,0x10,0x94,0x29,0x08,0x0f,0x2b,0x3f,0xfe,0x0b,0x13};
    sm9_fp_from_bytes(a, a31);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a32[32] = {0xaf,0x2c,0x5f,0x3e,0xdb,0x15,0xd2,0x3e,0x51,0x7d,0x3b,0x06,0xa7,0x76,0x0f,0x52,0x91,0xb8,0x1c,0xb6,0xd6,0x88,0xf1,0x22,0xdf,0x7d,0xdd,0x8c,0x6a,0x04,0xc6,0x78};
    static std::uint8_t c32[32] = {0x55,0x43,0x46,0xb6,0x3b,0x37,0x9e,0x85,0x9d,0x28,0x17,0x83,0xd8,0xeb,0x05,0x2a,0x26,0x01,0x28,0x85,0x20,0x75,0x58,0x2d,0x23,0xfd,0x09,0xc0,0x42,0xd6,0x24,0x11};
    sm9_fp_from_bytes(a, a32);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a33[32] = {0x8f,0x07,0xd0,0xe6,0x68,0xe5,0x7a,0x2b,0x93,0x64,0x7d,0xc0,0x3e,0x62,0xd4,0xe0,0x1a,0x5a,0xdc,0xa3,0x53,0x58,0xec,0x0d,0xb1,0xe8,0x77,0x50,0x12,0x58,0xc8,0xce};
    static std::uint8_t c33[32] = {0x91,0xbc,0xf3,0x4b,0x76,0x35,0x9e,0x3f,0xa0,0xe1,0x38,0xca,0xa1,0xf1,0x1a,0xdf,0x1f,0xee,0x9b,0x6f,0x4f,0x47,0xba,0xd8,0x68,0xbf,0x61,0x38,0x93,0x87,0x76,0xb8};
    sm9_fp_from_bytes(a, a33);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a34[32] = {0x1b,0x8f,0xb8,0x48,0xd4,0x21,0x16,0xd8,0x16,0x0f,0x81,0xef,0x8a,0xad,0xac,0xcf,0x1a,0xc1,0x82,0x96,0x86,0x46,0x9c,0xe8,0x8d,0x3a,0xa8,0xba,0x61,0xf3,0xfb,0xbd};
    static std::uint8_t c34[32] = {0xa1,0x09,0x0d,0x2b,0xd3,0x98,0xb6,0xa8,0x7a,0x17,0xfa,0x98,0xbb,0x55,0x35,0xf2,0x75,0x44,0x15,0xe8,0x3d,0x30,0xe2,0x15,0x30,0xa3,0x19,0x72,0xd3,0x7c,0x57,0x0b};
    sm9_fp_from_bytes(a, a34);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a35[32] = {0x0f,0xb1,0xd7,0xae,0xfc,0x85,0x38,0xe9,0xe2,0x73,0xe3,0x36,0x40,0x9c,0x55,0x4b,0x45,0xf7,0xf7,0x3c,0x5a,0x6e,0x25,0xe2,0x49,0x74,0x92,0x7b,0xdd,0xa2,0x9b,0xfd};
    static std::uint8_t c35[32] = {0xa0,0xf5,0x48,0x11,0xd4,0x73,0x60,0x49,0xca,0xa0,0x9d,0xc7,0x9d,0x58,0xd4,0x7a,0x3a,0x13,0x29,0x0e,0xf8,0x6b,0x75,0xfd,0x0d,0x56,0xc3,0xb3,0x38,0xb0,0xba,0x7f};
    sm9_fp_from_bytes(a, a35);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a36[32] = {0x7f,0x03,0x84,0xb1,0x78,0x27,0x51,0xe8,0xd3,0xc0,0x98,0xe0,0xa2,0x25,0x30,0xf0,0x40,0x28,0x7b,0xce,0x26,0x35,0xd6,0x6f,0xdf,0xc6,0xa4,0x32,0x44,0x17,0x39,0x88};
    static std::uint8_t c36[32] = {0x2d,0xf0,0x54,0x7a,0x36,0x18,0x19,0xa8,0x67,0x04,0x5e,0xc0,0xed,0xc7,0x87,0x77,0xbc,0xe5,0xaf,0x36,0x7e,0x15,0x7f,0x6d,0x43,0xb2,0x18,0xfa,0x0a,0x67,0x47,0xd3};
    sm9_fp_from_bytes(a, a36);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a37[32] = {0x34,0x66,0x39,0xb2,0x47,0x6f,0x23,0xd5,0xe5,0x94,0x7b,0x16,0xb7,0x49,0xb7,0xab,0xbc,0xb6,0xdb,0xca,0xd7,0xc0,0xaf,0xb4,0xe8,0x2e,0x7e,0x40,0xc5,0xec,0xa2,0x29};
    static std::uint8_t c37[32] = {0x17,0x65,0x0c,0x54,0x64,0x8c,0xae,0x6b,0xa1,0xa3,0x44,0xcb,0x49,0x07,0xf6,0xe9,0x1d,0x7e,0x17,0xff,0x39,0x02,0x50,0x1a,0x44,0x0f,0xbf,0x9a,0x22,0xde,0xcf,0x0b};
    sm9_fp_from_bytes(a, a37);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a38[32] = {0xb1,0xe7,0x32,0xe9,0x3e,0x5c,0x89,0xd8,0xa7,0x1c,0x5a,0xff,0x14,0xd1,0x64,0x3f,0x40,0x92,0x74,0x95,0xbf,0x00,0x2e,0x3e,0xd3,0x90,0x4d,0x8d,0xa1,0xa9,0x13,0xb7};
    static std::uint8_t c38[32] = {0x88,0xdb,0x51,0x6a,0x4f,0x87,0x38,0x0f,0x95,0x9b,0x12,0x79,0x77,0x6b,0xae,0x2f,0xaf,0x72,0xb3,0xa7,0xca,0x68,0x87,0x28,0x39,0x14,0x40,0x79,0xdc,0xb7,0x8f,0xf3};
    sm9_fp_from_bytes(a, a38);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a39[32] = {0x38,0x99,0x63,0xbd,0x35,0x83,0xa2,0xff,0xeb,0xea,0xe0,0xb9,0x14,0x29,0x9c,0x7b,0x7d,0x38,0x08,0xc5,0xdd,0x3b,0x81,0x52,0xc7,0x07,0xdb,0xf3,0xf0,0x00,0xbc,0xe0};
    static std::uint8_t c39[32] = {0x0c,0xfd,0x00,0x14,0x84,0xe6,0x2b,0x82,0x8d,0x6b,0xe4,0x99,0x36,0xb2,0xff,0xc2,0x3c,0x67,0x50,0x56,0x8f,0xaf,0xc3,0xe1,0x99,0xce,0xd5,0x6e,0xe8,0xfe,0x78,0x51};
    sm9_fp_from_bytes(a, a39);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a40[32] = {0xa1,0xaf,0x08,0x6a,0xdf,0x2a,0x66,0x89,0x76,0xe2,0x68,0xce,0x0b,0x49,0x67,0xc2,0x61,0x6e,0x69,0x1a,0x82,0xf2,0x39,0xae,0x79,0xb8,0xb9,0x98,0x31,0x38,0x26,0x15};
    static std::uint8_t c40[32] = {0x4e,0x94,0x2c,0x8b,0x68,0x7c,0x70,0x2b,0xbc,0xe5,0xa5,0x95,0xea,0x44,0xd3,0x49,0xe2,0x23,0xc6,0xcb,0xd8,0x8a,0xe1,0xf2,0x88,0x9c,0x93,0x9f,0x93,0xfd,0xfb,0xb0};
    sm9_fp_from_bytes(a, a40);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a41[32] = {0x9b,0xaf,0x74,0x80,0xd5,0x12,0x2e,0x02,0x48,0x14,0x52,0x30,0x8c,0x22,0x9b,0x69,0x20,0x26,0x46,0xa9,0x64,0x2f,0x02,0x1b,0xfa,0xac,0xb9,0x96,0x87,0x61,0x44,0x0c};
    static std::uint8_t c41[32] = {0x3a,0x61,0xfb,0x51,0x50,0x79,0x11,0xbb,0x4d,0x8a,0x83,0x6f,0x4e,0xf8,0x5c,0x88,0xea,0xf4,0x25,0xb4,0x4c,0x60,0x68,0x50,0xfb,0x33,0xb2,0x93,0xeb,0x19,0xa9,0x20};
    sm9_fp_from_bytes(a, a41);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a42[32] = {0x65,0x69,0xf7,0x2f,0x3d,0xb5,0x30,0xa7,0x8e,0xe9,0x85,0x48,0x88,0x94,0xa6,0xc3,0x3e,0x3c,0xc9,0x00,0xac,0x06,0x0e,0x15,0x1b,0xec,0x8e,0x6b,0xa3,0x3d,0xdb,0x11};
    static std::uint8_t c42[32] = {0x04,0x4c,0x49,0x44,0xca,0xe5,0x02,0x1c,0x6b,0xb8,0xce,0x2e,0x74,0x18,0xf6,0xee,0x60,0x29,0xb5,0x28,0xa9,0xc4,0x1e,0x0c,0xcf,0xea,0xb4,0x63,0x2c,0x8c,0x9d,0x16};
    sm9_fp_from_bytes(a, a42);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a43[32] = {0x8b,0x36,0x35,0x3a,0x9f,0x68,0x72,0x11,0xa7,0x60,0xe7,0xee,0xe7,0x81,0x88,0xfd,0xee,0xb2,0xe7,0x20,0x1a,0x74,0x38,0x2c,0xa9,0x8d,0xe3,0xcc,0xfc,0x94,0x31,0x85};
    static std::uint8_t c43[32] = {0x75,0x85,0x8f,0x9c,0x84,0xe8,0x90,0x7f,0x3c,0x44,0x67,0xa7,0xa3,0x9a,0xb5,0x9f,0x7a,0xc2,0x78,0x91,0x25,0x88,0x13,0xfa,0x01,0x3d,0x65,0x89,0xe0,0x67,0x7c,0xe2};
    sm9_fp_from_bytes(a, a43);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a44[32] = {0x13,0x04,0x79,0x7d,0x76,0x3c,0x13,0xf0,0xf8,0xd5,0x96,0x26,0x53,0xdb,0x4d,0x80,0x37,0xaf,0xee,0x4d,0x32,0x2e,0x6a,0xce,0x0a,0xd6,0x1f,0x50,0x8d,0x29,0x1f,0xcd};
    static std::uint8_t c44[32] = {0x14,0x69,0x80,0xbc,0xdf,0x3b,0xaa,0xf3,0x8d,0xd5,0x28,0xf5,0xd8,0xd7,0x3b,0xaf,0xf0,0xd9,0x8e,0x05,0x09,0x46,0xb3,0xa0,0xfe,0x5b,0x0e,0x36,0x39,0xba,0xac,0x35};
    sm9_fp_from_bytes(a, a44);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a45[32] = {0x7c,0x42,0x7f,0xb4,0xf6,0x3a,0xb8,0x19,0x1a,0xa2,0x94,0x3f,0x67,0x66,0x0f,0xbc,0x9f,0xeb,0xc7,0x4c,0x82,0x11,0x42,0x29,0xc9,0x20,0x94,0x23,0x0d,0x1f,0xfc,0xb7};
    static std::uint8_t c45[32] = {0x06,0x2f,0xe5,0xf7,0x60,0x79,0x93,0x44,0xfa,0xed,0x47,0x75,0x0c,0x20,0xb9,0xb0,0xc6,0xaa,0x0a,0x80,0xf1,0x55,0x55,0xbf,0x6b,0x62,0xc2,0x19,0xb5,0x43,0x85,0x65};
    sm9_fp_from_bytes(a, a45);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a46[32] = {0x2e,0xf3,0xb5,0xeb,0xcf,0x30,0xa7,0x57,0x1e,0xca,0x2c,0x7f,0x5e,0x77,0xe7,0x91,0x38,0x9b,0xec,0x64,0x59,0xd2,0x52,0x77,0xae,0x8f,0xae,0x0e,0xfe,0x23,0x9a,0x07};
    static std::uint8_t c46[32] = {0x1b,0x01,0x84,0xc0,0x57,0xc6,0x16,0x34,0xb3,0x3d,0xee,0x6a,0x26,0x6b,0x60,0x27,0x12,0x27,0xe9,0x59,0xfc,0x12,0xaa,0xbc,0x84,0xeb,0x6c,0xe3,0x89,0x0a,0xca,0xd5};
    sm9_fp_from_bytes(a, a46);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a47[32] = {0x07,0xc9,0x02,0xa1,0x5c,0x59,0x35,0x2d,0x42,0xd2,0x7e,0x4e,0x4b,0x4d,0x95,0x42,0x8f,0x48,0x38,0xba,0x16,0xa6,0xb7,0xe9,0x74,0x0b,0xcc,0x1d,0xa6,0x21,0x76,0x9d};
    static std::uint8_t c47[32] = {0x58,0xec,0xb7,0x2a,0xa1,0x51,0x3e,0xad,0x38,0x20,0x92,0x25,0x1e,0x4a,0xfc,0xbd,0x91,0xb4,0x90,0x54,0x0e,0x85,0xf6,0x13,0x06,0xc4,0x97,0xc9,0x30,0x7e,0x53,0x03};
    sm9_fp_from_bytes(a, a47);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a48[32] = {0x6c,0x45,0x18,0xe2,0x36,0xe7,0x32,0xe1,0xc8,0x0a,0xf1,0x93,0x6c,0x9e,0x78,0xef,0x69,0x3d,0x4f,0xb2,0x3f,0xf9,0x6f,0x5b,0x44,0xe5,0x42,0x30,0xc6,0xe8,0xc5,0x4e};
    static std::uint8_t c48[32] = {0x7d,0x71,0xba,0xa9,0x4b,0xf4,0x72,0x5d,0x6d,0xe3,0x02,0xf5,0x80,0x2c,0xcc,0xc2,0x0a,0x17,0xf6,0xf9,0xc8,0x7e,0x11,0xd4,0x34,0xea,0x0d,0x28,0x08,0xcf,0x89,0x4f};
    sm9_fp_from_bytes(a, a48);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a49[32] = {0x5d,0x27,0xa5,0x35,0x5e,0x4e,0x7c,0x57,0x09,0xc6,0x8f,0x8f,0x5d,0x04,0x82,0x98,0x32,0x08,0xe6,0x79,0xdc,0xa6,0xe3,0x1c,0x23,0xb1,0xde,0x5e,0x6d,0x66,0x8d,0xf8};
    static std::uint8_t c49[32] = {0x58,0x1a,0x2b,0xe6,0x92,0xb5,0xa2,0x9f,0x2b,0xf9,0xff,0x35,0x14,0x1f,0x4d,0x6a,0x6f,0x8e,0x7d,0x5c,0x24,0x15,0xce,0xe7,0xa9,0xfb,0x9d,0x9d,0x27,0x69,0x55,0xbb};
    sm9_fp_from_bytes(a, a49);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a50[32] = {0xae,0x6e,0xf2,0xd0,0x9c,0x95,0x34,0x85,0x99,0x23,0x0f,0xdf,0x08,0xcd,0xc4,0xbf,0x27,0x4d,0x33,0xfb,0x77,0xe0,0xe2,0x31,0xcb,0x53,0xab,0x43,0xae,0x0f,0x70,0xd3};
    static std::uint8_t c50[32] = {0x11,0x1f,0xa1,0xba,0x08,0x2d,0x15,0x8f,0x4e,0x28,0x7a,0xc0,0x9b,0xa0,0xa5,0xc7,0xa8,0x90,0xc2,0xc1,0x9f,0x76,0x0b,0x27,0xae,0x17,0x99,0x4d,0x25,0xf3,0xff,0x60};
    sm9_fp_from_bytes(a, a50);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a51[32] = {0x30,0x36,0x4a,0x60,0x07,0x1e,0xaf,0x3e,0xaa,0xaa,0x9e,0xbc,0xf9,0xe6,0xfe,0x15,0xe0,0x02,0x23,0x0e,0xdc,0xbe,0x94,0x2c,0xa4,0xf3,0x61,0x44,0xf7,0xb5,0xb8,0x46};
    static std::uint8_t c51[32] = {0x2f,0x0e,0x21,0x51,0x2d,0x15,0x67,0x4c,0x96,0x1e,0xcd,0x78,0x17,0xf0,0x11,0x74,0x34,0xc6,0x9d,0x48,0xf7,0xa0,0x4f,0x4b,0x4e,0x0f,0xfd,0x73,0xf9,0x36,0x2a,0xf4};
    sm9_fp_from_bytes(a, a51);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a52[32] = {0x0c,0xc3,0x01,0x57,0x7d,0x4e,0x2a,0x5f,0xd8,0xf2,0xaf,0x12,0x62,0x4c,0x88,0x7a,0x58,0xdc,0x16,0x2c,0x6a,0xaf,0x14,0x47,0xc5,0xea,0x7a,0xa4,0x87,0xf9,0xfb,0x61};
    static std::uint8_t c52[32] = {0x29,0xb0,0x73,0xab,0x17,0xdf,0x04,0xfa,0xb5,0xe3,0x27,0xc4,0xb4,0x17,0x6c,0xff,0x9b,0x22,0x29,0x5c,0xde,0xec,0xcd,0x66,0xfe,0xa4,0x42,0x37,0xa4,0x9e,0x3c,0x20};
    sm9_fp_from_bytes(a, a52);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a53[32] = {0x01,0xeb,0x94,0xf2,0x39,0xbe,0xa2,0x37,0x0c,0x95,0x30,0x18,0x5c,0xac,0x30,0x27,0x9d,0xa2,0x4b,0x91,0x19,0xa8,0xd1,0xc3,0xa8,0x92,0xf8,0xd8,0x99,0x18,0x4e,0x32};
    static std::uint8_t c53[32] = {0x7c,0x4a,0x7f,0xe8,0x02,0x32,0x0b,0xd0,0xa4,0x35,0x43,0xb0,0xca,0xe8,0x7c,0x84,0x15,0x95,0x1d,0x78,0x3c,0x5a,0x45,0x1f,0x3c,0x87,0x1b,0x41,0xde,0x01,0x66,0x6c};
    sm9_fp_from_bytes(a, a53);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a54[32] = {0x77,0x1d,0x03,0x68,0x5a,0x40,0x8a,0x13,0x83,0x8a,0x45,0xce,0x28,0x01,0x5f,0x93,0x0b,0x7a,0xe1,0x39,0x85,0x23,0xfe,0x2b,0x71,0x0b,0xb0,0x13,0x7d,0xc5,0x24,0xca};
    static std::uint8_t c54[32] = {0x37,0x73,0x7f,0x3a,0xf0,0xa7,0xd4,0x24,0xe6,0xf1,0xe9,0x86,0x5e,0xc6,0x05,0xc8,0x2e,0xdf,0x50,0xa0,0xf1,0x40,0x3f,0x21,0x46,0xe2,0x35,0x93,0xff,0xc3,0xac,0xcb};
    sm9_fp_from_bytes(a, a54);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a55[32] = {0x96,0xfa,0x2c,0x1a,0x49,0xd1,0x30,0x0a,0xbd,0x08,0xb6,0x34,0xce,0x25,0x08,0x99,0x9e,0xa8,0x37,0xa4,0x24,0x7a,0x5b,0xa9,0xc8,0x93,0xc5,0x48,0x9b,0x73,0xf7,0xe7};
    static std::uint8_t c55[32] = {0x6e,0xb5,0x9e,0x30,0x78,0x5b,0xac,0x63,0x5c,0x03,0xb9,0x5f,0xd6,0xcf,0x26,0x72,0x72,0x7a,0xc4,0x85,0x93,0xbd,0x5a,0x3e,0x1b,0x0b,0x2f,0x93,0x72,0x13,0x12,0xc7};
    sm9_fp_from_bytes(a, a55);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a56[32] = {0x13,0xc2,0x98,0xd7,0xde,0xdd,0x4d,0xd4,0x4a,0x1a,0x57,0xb4,0xb2,0xda,0x69,0xbc,0xa7,0x92,0xa8,0xa3,0x9e,0xa1,0x04,0xd0,0x12,0x1b,0xf5,0x90,0x62,0xf0,0xc4,0x2f};
    static std::uint8_t c56[32] = {0x67,0xf5,0x0f,0x32,0x11,0xba,0x52,0xf9,0x38,0x6e,0xe3,0xad,0xa3,0x0f,0x81,0xf1,0xe1,0xcf,0x7c,0xb9,0xeb,0x83,0x12,0x6b,0xbc,0x4e,0x6c,0x27,0x4b,0xc9,0x34,0x01};
    sm9_fp_from_bytes(a, a56);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a57[32] = {0x6e,0xbe,0x7e,0x5d,0x39,0xfb,0x19,0x2b,0x7f,0xef,0x34,0x6f,0x05,0x19,0x8b,0xe9,0xad,0xab,0x2e,0xfe,0x56,0xf3,0xf4,0x95,0x15,0x24,0x74,0x05,0x75,0x7e,0x17,0xb0};
    static std::uint8_t c57[32] = {0x9a,0xc3,0xc9,0xf3,0xb1,0x55,0x5b,0x96,0xeb,0xba,0xf2,0xa4,0x22,0xdf,0x00,0x35,0xb1,0xd4,0xcd,0x91,0xad,0xd0,0x97,0xf1,0xd9,0x3f,0xf4,0x9b,0xe6,0x1a,0xdb,0xcd};
    sm9_fp_from_bytes(a, a57);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a58[32] = {0x02,0xc6,0x2e,0x51,0x83,0x00,0x1d,0xd2,0xf4,0xe6,0xd1,0x7f,0x33,0x60,0x93,0x01,0x4a,0x58,0x7f,0xbd,0xac,0xa6,0x4c,0xaa,0xaf,0xdd,0x08,0xfd,0x9a,0x6e,0x50,0xc0};
    static std::uint8_t c58[32] = {0x51,0x75,0x34,0x43,0x7f,0x96,0x00,0xa2,0xb2,0xa2,0x8f,0xac,0xf4,0xe7,0x67,0xa6,0xa3,0xd9,0xf1,0x2e,0x0d,0x4a,0x36,0x4f,0xe8,0x6f,0x2e,0x95,0x7d,0x1c,0x50,0x45};
    sm9_fp_from_bytes(a, a58);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a59[32] = {0x6d,0x4f,0x4a,0x3d,0x53,0x32,0x08,0xd5,0x0d,0xf1,0x8f,0x8a,0x3f,0x09,0x31,0xe1,0x50,0xa9,0x5f,0x4b,0x1f,0x98,0xd0,0x08,0x29,0x01,0x35,0x4b,0x0d,0x77,0x9f,0x41};
    static std::uint8_t c59[32] = {0xae,0xf8,0x32,0x38,0x07,0x47,0x57,0xf7,0xaa,0xc5,0xbf,0x17,0xbe,0xca,0xf9,0x5b,0xf1,0xc1,0x68,0x5e,0xa7,0x16,0xf2,0xb6,0xe0,0x56,0x74,0xa5,0x8c,0xd6,0x03,0xe9};
    sm9_fp_from_bytes(a, a59);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a60[32] = {0x43,0x15,0xc6,0x31,0xef,0x2a,0xdf,0x84,0x06,0x3a,0x0f,0xcf,0x71,0xd2,0xe1,0xd5,0x7c,0xfa,0xf2,0xcd,0xf1,0x78,0xad,0x3e,0x80,0xf5,0x51,0x76,0x77,0x61,0xb9,0xa8};
    static std::uint8_t c60[32] = {0x1b,0x32,0x73,0x54,0x5f,0xf9,0xbd,0x8d,0x9e,0xd6,0xf4,0xd8,0x14,0xd2,0x24,0x1f,0x14,0x85,0xba,0xc2,0x45,0x51,0xfc,0x7f,0x96,0xde,0x22,0xfd,0xad,0x53,0x93,0x23};
    sm9_fp_from_bytes(a, a60);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a61[32] = {0x81,0x17,0xcc,0x16,0x4f,0xc5,0x5f,0xe9,0xdc,0x90,0x5d,0x30,0xba,0x46,0x63,0xc3,0x46,0x5a,0x11,0x0e,0x9e,0x49,0xd9,0x0e,0x1d,0x60,0x85,0xa9,0xfa,0x1c,0xce,0xc6};
    static std::uint8_t c61[32] = {0x4e,0xef,0x01,0xc6,0x46,0x6a,0x19,0xeb,0x21,0x0d,0x0e,0xf1,0xe7,0xb0,0xea,0x06,0x75,0x01,0x1b,0x35,0xc2,0xf4,0x0b,0x70,0x2f,0xa2,0x43,0x81,0x36,0xeb,0x17,0x46};
    sm9_fp_from_bytes(a, a61);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a62[32] = {0x1e,0x67,0xca,0xe7,0xa5,0xf6,0x01,0x5e,0x0c,0xd2,0xa5,0x96,0xa9,0x8c,0xfa,0x0a,0xf2,0x96,0xff,0x89,0xd4,0xe3,0x7f,0x62,0x9b,0x85,0xfc,0x2e,0x63,0xa2,0x42,0x8d};
    static std::uint8_t c62[32] = {0x8b,0xd0,0x50,0xff,0xcf,0x06,0x4f,0x0f,0xc9,0xb2,0xc8,0x38,0x4b,0x63,0x9a,0xfd,0xd9,0x10,0xfa,0xa3,0xca,0x42,0x47,0x9c,0xfb,0xd7,0x84,0x23,0xc0,0x78,0x3b,0x46};
    sm9_fp_from_bytes(a, a62);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a63[32] = {0x4f,0x36,0x99,0xb1,0xcc,0x22,0x4a,0xe4,0x01,0x48,0x09,0x76,0xc0,0x63,0xcd,0xed,0x7c,0xb0,0x76,0xc5,0xdc,0x15,0xf7,0x4f,0x6a,0x17,0x30,0x7b,0xf8,0xfa,0xfe,0x6f};
    static std::uint8_t c63[32] = {0x61,0x53,0x58,0xde,0xf6,0x4a,0x12,0x97,0xa8,0x60,0xb0,0xc0,0x88,0x1e,0x8e,0x02,0x65,0x53,0xf4,0xc4,0x03,0x27,0xd3,0xbd,0x23,0xfb,0x76,0xa3,0xb7,0xc6,0xac,0xd3};
    sm9_fp_from_bytes(a, a63);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a64[32] = {0x02,0x9a,0x57,0xff,0x64,0x4e,0xdb,0x0f,0x82,0xbf,0x16,0x9f,0x39,0x95,0x51,0x93,0x6a,0x84,0xef,0xf8,0xb0,0x69,0x8f,0x16,0x1a,0x1d,0x39,0x11,0x0e,0x0a,0xcd,0x16};
    static std::uint8_t c64[32] = {0x1d,0x95,0x11,0xaf,0xf7,0x53,0x3a,0xba,0x3a,0x96,0xfd,0x73,0xee,0x30,0x13,0x76,0x4b,0x94,0x53,0xfc,0x72,0x41,0x4f,0xc7,0x72,0x3d,0xf7,0xb0,0x44,0xfa,0x2c,0x90};
    sm9_fp_from_bytes(a, a64);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a65[32] = {0x0a,0x7b,0xac,0x86,0x45,0xb6,0x08,0xbc,0xea,0x2e,0x0d,0xec,0xf3,0x42,0x72,0x89,0xd0,0x8e,0x15,0xc1,0x86,0x09,0x4d,0xae,0x10,0x28,0x5b,0x66,0xf6,0x58,0x07,0x41};
    static std::uint8_t c65[32] = {0xb4,0x1d,0x95,0xcf,0x43,0x7d,0xa0,0x05,0x33,0xf1,0xbe,0x76,0xe3,0x5d,0xdd,0xcc,0x68,0x32,0xd2,0x4e,0xb2,0xb8,0x2c,0x9f,0x48,0x08,0x2c,0x80,0xc4,0x0a,0x0c,0x21};
    sm9_fp_from_bytes(a, a65);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a66[32] = {0x14,0xf2,0x30,0xf4,0x9d,0x0f,0x6c,0x97,0x67,0x0d,0x7f,0x1a,0x50,0x52,0xa3,0x0c,0xa9,0x95,0x3a,0x03,0xd4,0xd5,0xad,0xbb,0xa6,0xed,0x29,0xde,0x40,0x43,0x13,0x27};
    static std::uint8_t c66[32] = {0x64,0x32,0x49,0x28,0x22,0xb5,0x27,0xb6,0x81,0x3d,0x95,0xe7,0x9f,0x39,0x17,0xb4,0x2d,0xac,0x1e,0x9d,0x67,0x8f,0xa7,0x98,0xb8,0x4d,0x2e,0xbf,0xc6,0x48,0x81,0x86};
    sm9_fp_from_bytes(a, a66);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a67[32] = {0x91,0xb0,0xae,0x2e,0x22,0xd5,0x4d,0x7c,0x4a,0xbd,0xa8,0xfa,0xcc,0xf1,0x83,0xb9,0x65,0x7a,0x3c,0x85,0x22,0xbc,0xeb,0x7c,0xb4,0xd2,0x6b,0x66,0x9e,0x8e,0xe1,0xe8};
    static std::uint8_t c67[32] = {0x89,0x23,0x9a,0xc2,0x1d,0x38,0xd4,0x31,0x78,0xd7,0xaf,0xd0,0xb9,0xf8,0xf4,0xe9,0xd8,0x1f,0xd6,0xf2,0x7c,0x01,0xc4,0x73,0xdd,0x71,0x51,0x42,0xe5,0x2a,0xe5,0xdd};
    sm9_fp_from_bytes(a, a67);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a68[32] = {0x2e,0x7d,0x6a,0xa6,0xc7,0x28,0xf9,0x3c,0x7f,0x8d,0x33,0x9f,0x61,0x69,0x96,0x8f,0x3e,0x5a,0x0d,0x97,0xe2,0xd3,0xb4,0xc1,0xe5,0x20,0x68,0xff,0x67,0x49,0xf9,0xcd};
    static std::uint8_t c68[32] = {0x97,0x73,0x9a,0x92,0x6c,0xa8,0x6a,0x61,0x31,0x8c,0xf4,0xd2,0x90,0xc6,0x33,0x9c,0xc0,0xc0,0xc8,0xaf,0xe8,0xef,0x17,0x4a,0x9d,0x29,0xe6,0x69,0x1d,0x80,0x4f,0x2d};
    sm9_fp_from_bytes(a, a68);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a69[32] = {0x12,0x2f,0x4f,0x4c,0x53,0x09,0x5d,0xde,0x2d,0x69,0xa8,0xa9,0x15,0x2a,0x89,0xcf,0x2e,0x20,0x7b,0xf9,0x88,0x2e,0x94,0xa6,0xc4,0xff,0x25,0xb8,0xc2,0x64,0xcb,0x7b};
    static std::uint8_t c69[32] = {0x99,0x1b,0x44,0x52,0x21,0x2b,0xb0,0x74,0x0f,0x50,0xb5,0xd1,0x31,0x51,0x07,0x82,0x57,0xb3,0x40,0xdf,0x7b,0xff,0x04,0x5d,0x10,0x05,0x10,0x44,0x9a,0x5f,0xc7,0xdd};
    sm9_fp_from_bytes(a, a69);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a70[32] = {0x4a,0x09,0x43,0xb2,0xca,0x15,0xdb,0x6f,0xaa,0x4d,0x91,0xb1,0xc6,0xc4,0x63,0x4e,0x67,0x16,0x27,0x1a,0xd9,0xd0,0x06,0x23,0x0f,0xfb,0xb7,0x2b,0xe1,0xad,0x81,0xa6};
    static std::uint8_t c70[32] = {0x1c,0xb3,0x04,0xed,0x1d,0x9f,0x76,0x27,0xdd,0xca,0x45,0x06,0x04,0x7b,0x89,0xc4,0x6e,0xa0,0x22,0xc3,0x30,0x11,0xed,0x41,0xf3,0x61,0x82,0xb4,0x54,0xf7,0xd5,0x24};
    sm9_fp_from_bytes(a, a70);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a71[32] = {0x5e,0x5d,0xe8,0x28,0xe8,0x12,0x68,0x92,0x2b,0x9f,0x1c,0x46,0xfd,0x22,0x1d,0x7a,0xa9,0xed,0x3d,0x9d,0xf8,0xfb,0x15,0x28,0x07,0xe3,0xb4,0xa0,0x2a,0x6c,0x91,0xea};
    static std::uint8_t c71[32] = {0x94,0x74,0xef,0x20,0x85,0xd5,0x21,0x1a,0xcf,0x2e,0x5b,0x9e,0x14,0xc2,0x57,0x52,0xb8,0x08,0x94,0x5f,0xf9,0xfd,0x3f,0x4c,0xcc,0xb1,0xf7,0x9d,0x17,0xb0,0x2b,0xaa};
    sm9_fp_from_bytes(a, a71);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a72[32] = {0x67,0x87,0x49,0xd4,0x0c,0x0c,0xd1,0xac,0x3c,0x26,0xaf,0x64,0x20,0x23,0x73,0x47,0xb9,0x3b,0x9f,0x5a,0x0f,0x80,0xa0,0x76,0xc9,0xda,0x65,0x37,0xea,0x19,0x51,0xb3};
    static std::uint8_t c72[32] = {0x24,0xe8,0x29,0x95,0xcf,0x41,0xf7,0xea,0x66,0x0c,0xad,0x5d,0x4a,0xf8,0xec,0xc3,0xb9,0xe9,0x31,0xc6,0xd2,0xd2,0xeb,0x21,0x13,0xc7,0xfa,0x3c,0x85,0x16,0xca,0x16};
    sm9_fp_from_bytes(a, a72);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a73[32] = {0x26,0x91,0x71,0xb5,0x15,0x4b,0x9d,0x26,0x8d,0x01,0x6c,0x2b,0xbf,0x03,0x2c,0x82,0xf0,0x9d,0x8c,0x48,0xd8,0xb1,0x4b,0x67,0x41,0x02,0x1c,0x7c,0xfd,0x01,0x66,0x62};
    static std::uint8_t c73[32] = {0x50,0x96,0x2d,0x3b,0xf5,0x61,0x0a,0x0b,0xbc,0x39,0xb4,0x57,0x03,0xea,0x84,0xc6,0xca,0x39,0x53,0xa8,0x03,0x05,0x98,0x85,0x52,0x29,0x7a,0x75,0xf0,0x64,0xdd,0x39};
    sm9_fp_from_bytes(a, a73);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a74[32] = {0x03,0xd2,0x40,0x8b,0xf9,0x7c,0x9b,0xa4,0x89,0x7a,0x3a,0xa8,0xf8,0x3b,0xc7,0x9a,0x48,0xe8,0x70,0x18,0x6f,0x9a,0xd3,0x0a,0x90,0x13,0xa1,0x4a,0x96,0x1f,0xb9,0x4d};
    static std::uint8_t c74[32] = {0x87,0x45,0x29,0x79,0xba,0x06,0xda,0x13,0x35,0xa2,0xd8,0xb5,0xe6,0x1c,0xf5,0x51,0x45,0xb4,0x1a,0x08,0x33,0x54,0x25,0x23,0xfa,0x8b,0x2f,0x1f,0x31,0x4e,0xb7,0xac};
    sm9_fp_from_bytes(a, a74);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a75[32] = {0x83,0xa3,0xc0,0x16,0x06,0x29,0xd3,0x1b,0xa3,0x8c,0xd7,0x10,0xed,0x47,0x57,0x65,0x34,0xc1,0x26,0x14,0x4e,0x19,0xbf,0xd4,0x2b,0xd8,0xd4,0x07,0x25,0x6b,0x44,0xcd};
    static std::uint8_t c75[32] = {0x18,0x92,0xc4,0xbd,0x99,0x42,0x24,0x1e,0x2d,0x10,0x31,0x47,0xe1,0x77,0x83,0xec,0x60,0x60,0x19,0x11,0xce,0xf0,0x8d,0x5e,0x40,0x2f,0xfa,0x1d,0x54,0xb2,0xb3,0x45};
    sm9_fp_from_bytes(a, a75);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a76[32] = {0x05,0xf0,0xb6,0x67,0xbd,0x77,0x12,0x63,0xef,0xfb,0x4f,0x18,0xe8,0x18,0x2b,0x77,0xbc,0x37,0xa6,0x44,0xab,0x95,0xbd,0xb1,0x67,0xdb,0x30,0x38,0xeb,0x45,0xaa,0x19};
    static std::uint8_t c76[32] = {0x21,0xf8,0x2e,0xbd,0x5c,0xdd,0xe2,0x69,0xe8,0xe5,0x10,0x54,0xa0,0x34,0x51,0xd7,0xe2,0x31,0x22,0x69,0x9d,0xca,0xa1,0xe3,0x08,0x00,0x62,0xa9,0xf4,0x95,0xe6,0xff};
    sm9_fp_from_bytes(a, a76);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a77[32] = {0x95,0xde,0xe0,0xfc,0xd3,0xfc,0x1e,0xb2,0x8c,0x06,0xcc,0x24,0x98,0x64,0x43,0x4a,0x75,0x5b,0xf6,0x9d,0x00,0xbe,0x5d,0x21,0xb4,0x03,0xb6,0xcf,0x04,0x15,0xd5,0x1b};
    static std::uint8_t c77[32] = {0x56,0x1d,0xc6,0xb9,0xb0,0xda,0x58,0xb2,0xdd,0xb3,0x51,0x5c,0x03,0x58,0xde,0x7e,0x5b,0xe2,0x94,0x04,0x79,0x61,0xd9,0x90,0xeb,0xb0,0x91,0xe3,0x0a,0xf2,0x40,0x6b};
    sm9_fp_from_bytes(a, a77);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a78[32] = {0x2c,0x33,0x83,0xca,0x50,0xa9,0x23,0xf6,0x17,0x8b,0x6f,0x1a,0xb3,0x13,0xdb,0x26,0x78,0x17,0x64,0x03,0x89,0xb5,0xd9,0xd4,0x74,0x52,0x94,0xc4,0x64,0xa9,0x4f,0x95};
    static std::uint8_t c78[32] = {0x3a,0x5a,0xbf,0x63,0x26,0x3c,0x1b,0xaf,0xff,0x52,0x07,0x55,0xbe,0xa3,0xa1,0x62,0xf7,0xe9,0x6a,0xd7,0x32,0x46,0x24,0x9b,0x41,0xa0,0x77,0x3a,0x3b,0xdd,0x6d,0x23};
    sm9_fp_from_bytes(a, a78);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a79[32] = {0x14,0x55,0x05,0xe7,0xfe,0x1d,0x48,0x22,0x3b,0xd6,0xb5,0xe7,0x98,0x97,0x36,0xc0,0x45,0x3b,0xa6,0x60,0x9d,0xf9,0xb3,0x99,0x3b,0xcb,0x41,0xd4,0x21,0xc8,0xcb,0x6a};
    static std::uint8_t c79[32] = {0x05,0xc9,0x91,0x0c,0x65,0xd2,0x53,0x71,0x99,0x94,0x2b,0x49,0xcf,0xfa,0xea,0x7e,0x4b,0xdd,0xd2,0x2e,0xb4,0xf1,0x24,0x60,0xca,0x99,0xf0,0x99,0xee,0x86,0x5c,0x4a};
    sm9_fp_from_bytes(a, a79);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a80[32] = {0x25,0xa1,0xfd,0xc7,0x5b,0x78,0x6c,0xb0,0x29,0x22,0xc0,0x6b,0x7e,0x28,0x87,0xd0,0xa8,0x94,0xe9,0xa1,0xc0,0x03,0x00,0x0e,0x98,0x50,0xdb,0xcf,0x35,0x32,0xa1,0xc7};
    static std::uint8_t c80[32] = {0x28,0x83,0x95,0x2a,0x78,0x2c,0x32,0xec,0xc9,0x25,0x14,0x0f,0x0c,0xa7,0xae,0xc6,0x2f,0x77,0x56,0x03,0x15,0x92,0x25,0x73,0xc1,0x83,0x3e,0x20,0xf5,0x9f,0xe5,0x1e};
    sm9_fp_from_bytes(a, a80);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a81[32] = {0xa0,0xb6,0x46,0x29,0xb1,0x86,0x79,0x9e,0x03,0x6f,0xc3,0x2d,0xcf,0x50,0x8a,0xed,0xd3,0xfb,0x62,0xd2,0x11,0xb9,0x5a,0x15,0x85,0xef,0x20,0x45,0x2f,0x48,0x45,0x5e};
    static std::uint8_t c81[32] = {0x76,0x7c,0xd7,0x06,0xb3,0xf4,0x2e,0xd6,0xa8,0xb7,0x2e,0x0e,0x80,0xe3,0xa7,0xcb,0x5f,0x26,0xd4,0x50,0x32,0x7a,0x5c,0x45,0x80,0x3f,0x28,0x3d,0xcc,0x32,0x7c,0x75};
    sm9_fp_from_bytes(a, a81);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a82[32] = {0xa4,0xd1,0xb2,0x5a,0x17,0x05,0x52,0x8f,0x28,0x87,0x7a,0x0e,0x27,0x27,0x5e,0x1b,0x52,0x25,0xad,0x75,0x87,0x26,0xd7,0xe9,0xa8,0xe7,0xca,0xf3,0xc3,0x39,0xbd,0x4b};
    static std::uint8_t c82[32] = {0x88,0xfc,0xa9,0x3d,0x9e,0xe3,0xee,0x54,0x6a,0xb4,0x5f,0x66,0x97,0xda,0x3f,0xfc,0xcc,0x78,0xd9,0x5a,0xf2,0x76,0xce,0x94,0x28,0xc8,0xa7,0x32,0x6a,0xb3,0xcf,0xbb};
    sm9_fp_from_bytes(a, a82);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a83[32] = {0x8e,0xcb,0x68,0xae,0xef,0x84,0xc9,0x42,0xd8,0x2d,0xcc,0x9d,0xdf,0x05,0x33,0x88,0x45,0xb7,0x24,0xc3,0xe2,0x82,0x38,0x6c,0x90,0x3a,0xbe,0xc7,0xa5,0xcf,0x97,0xd9};
    static std::uint8_t c83[32] = {0x5e,0x35,0x41,0x96,0x40,0xe7,0xf6,0xc5,0x2c,0x5c,0xc7,0x57,0x89,0x5d,0x5d,0xba,0x91,0x3e,0xb1,0xb0,0xf5,0x88,0x51,0x9f,0x70,0x0c,0xc0,0xe9,0x5e,0xad,0x7a,0x4c};
    sm9_fp_from_bytes(a, a83);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a84[32] = {0x5b,0xcd,0xc5,0x7f,0xf8,0x0e,0xdb,0x84,0xc6,0xc8,0x8f,0x95,0x6e,0x61,0xfa,0xe7,0x17,0x10,0xdf,0x1c,0xe8,0xed,0x55,0xde,0xd4,0xe8,0x66,0x3a,0xbb,0x0e,0xce,0x2b};
    static std::uint8_t c84[32] = {0x7f,0x3d,0x32,0x84,0x60,0x4c,0x71,0x4f,0x36,0xab,0xca,0x94,0x0b,0x0a,0xef,0xf8,0x4e,0x60,0xdf,0x84,0xe2,0x21,0xd9,0x70,0xb6,0x2b,0x5d,0x0d,0x00,0xb1,0x1a,0xff};
    sm9_fp_from_bytes(a, a84);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a85[32] = {0xb4,0x2f,0x3c,0xce,0x3b,0xc1,0x7c,0x68,0x15,0x0c,0x92,0x93,0x49,0x78,0x2c,0x1f,0xc2,0xd3,0xfc,0xd5,0xa8,0xcf,0xf1,0xfd,0xb8,0x5b,0x95,0xd1,0x1e,0x56,0x17,0x89};
    static std::uint8_t c85[32] = {0x47,0xf7,0xe5,0x9c,0x8a,0x02,0x34,0x7d,0x9e,0x0c,0xc9,0xe8,0xbe,0x49,0xae,0xcd,0x21,0xf7,0x03,0x8a,0x14,0xfb,0xe5,0xbd,0x1f,0xf0,0x48,0x78,0xf6,0xea,0x9c,0x75};
    sm9_fp_from_bytes(a, a85);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a86[32] = {0x1a,0xdf,0x63,0x04,0x3e,0xf0,0x96,0x29,0x97,0xaa,0x2e,0xf2,0x83,0x95,0xf8,0x35,0x3d,0x76,0x43,0xcd,0x96,0xa8,0x65,0x74,0xb9,0x1b,0xf3,0xfe,0x5a,0xac,0x31,0xde};
    static std::uint8_t c86[32] = {0x66,0x24,0xda,0x8d,0xf1,0xd9,0x5c,0x44,0xf5,0xb4,0x8d,0x80,0x42,0x2f,0xb0,0x30,0xd3,0xd7,0x15,0xd8,0x9b,0xc1,0x5a,0xee,0x5f,0xd7,0x99,0xff,0x81,0x21,0x7a,0xc3};
    sm9_fp_from_bytes(a, a86);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a87[32] = {0x92,0xa8,0xfd,0xa1,0xa7,0x73,0x00,0xd9,0x87,0x01,0xb7,0x01,0x29,0xb1,0x99,0x2f,0xad,0xea,0x2b,0x1c,0x94,0x9a,0x71,0x2d,0xd6,0x2d,0x27,0x47,0x48,0xba,0x0a,0xae};
    static std::uint8_t c87[32] = {0x29,0x2e,0x79,0x4b,0x69,0x95,0xa6,0x6d,0xca,0x37,0x9f,0xd9,0xbf,0x2a,0x50,0xb6,0x8f,0xca,0x43,0xe0,0xdb,0xfa,0xeb,0xa7,0x23,0x3c,0x02,0xc8,0x35,0xef,0x0e,0xe7};
    sm9_fp_from_bytes(a, a87);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a88[32] = {0x95,0xdb,0x7f,0xe9,0x58,0xde,0x70,0x7d,0x91,0xf2,0x08,0xca,0x9b,0x43,0x50,0x1d,0x60,0xf9,0xc3,0xca,0x12,0x7e,0x51,0x6e,0x5c,0x93,0x46,0x86,0xfe,0x3f,0x6c,0x08};
    static std::uint8_t c88[32] = {0x2a,0xdd,0xaa,0x00,0x88,0x26,0x7a,0x86,0x9e,0x45,0x19,0x5a,0x55,0x34,0x59,0x41,0x3b,0x55,0x11,0x7b,0xa4,0x35,0x26,0x46,0xeb,0xe6,0xb2,0x76,0x48,0xf9,0x78,0xcb};
    sm9_fp_from_bytes(a, a88);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a89[32] = {0x44,0xac,0xfa,0xcc,0x42,0xbd,0xa7,0xac,0x00,0xec,0x5f,0x2f,0xbd,0x2c,0xeb,0x67,0x83,0x06,0xa2,0xd0,0x16,0x17,0x92,0x3b,0x12,0x50,0x97,0xfa,0xf0,0x09,0xd4,0x8a};
    static std::uint8_t c89[32] = {0x55,0x2b,0x21,0x4f,0xdd,0xea,0x25,0x29,0x7c,0x09,0xce,0xb8,0xcf,0xed,0x98,0x1b,0x0f,0x15,0x52,0x57,0xe9,0x05,0xd7,0x29,0x1e,0xdb,0x1e,0x32,0x4e,0x51,0xcc,0x33};
    sm9_fp_from_bytes(a, a89);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a90[32] = {0x33,0x5d,0x2d,0xcf,0x39,0x4b,0x83,0x98,0xc1,0x62,0xab,0x95,0x14,0x8e,0x56,0x45,0x69,0x42,0x91,0x15,0x7b,0x0f,0xa7,0xeb,0x7b,0x6b,0x8d,0xd0,0xe6,0xc8,0x2f,0x10};
    static std::uint8_t c90[32] = {0x4f,0x66,0xda,0x84,0x6e,0x37,0x82,0x4a,0x1d,0xdf,0xe2,0xbf,0x9a,0x97,0xeb,0x01,0x26,0x1f,0xc8,0x29,0x51,0xad,0x5b,0x48,0xee,0x1e,0xe7,0x84,0xee,0xc0,0xa3,0x86};
    sm9_fp_from_bytes(a, a90);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a91[32] = {0x90,0xf9,0x73,0x14,0x37,0x0a,0xb9,0x33,0xca,0x01,0xf5,0xe4,0x54,0x5a,0x08,0x25,0x99,0xdc,0xb2,0xca,0x54,0x51,0x3c,0x77,0x47,0x0b,0xfd,0x07,0x11,0xcf,0x13,0xbf};
    static std::uint8_t c91[32] = {0x1a,0xf0,0xde,0x35,0x7e,0x71,0xea,0x04,0x37,0x4a,0xea,0x40,0x20,0x6f,0x9f,0xa5,0x54,0x99,0x18,0x3c,0x9b,0x12,0x40,0x01,0xff,0xa6,0x4c,0xc5,0xc3,0xa5,0x89,0x9d};
    sm9_fp_from_bytes(a, a91);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a92[32] = {0x2e,0xe1,0xde,0x40,0x2b,0x13,0x89,0x76,0xe9,0xb5,0xda,0x16,0x89,0xd1,0x70,0x9d,0xb3,0xa8,0x55,0x70,0x71,0xfb,0x64,0x86,0xd8,0x21,0xa6,0x04,0xc1,0xf2,0xf5,0x83};
    static std::uint8_t c92[32] = {0xa6,0xf1,0xb5,0x66,0x28,0x42,0x8b,0x52,0x93,0xa9,0xef,0x74,0x71,0xb8,0xaf,0xef,0x77,0xf1,0x47,0x61,0x16,0x1c,0x16,0xf2,0x89,0x97,0x66,0xd1,0x5c,0x4c,0xac,0x0f};
    sm9_fp_from_bytes(a, a92);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a93[32] = {0x14,0x0b,0xa9,0x52,0xad,0x58,0x58,0x4e,0xee,0xa4,0xa0,0x47,0x5f,0xb9,0xb6,0x4a,0xf2,0x59,0x89,0x23,0xd3,0x24,0x93,0xf8,0x10,0xcd,0xb7,0x73,0xb6,0x9f,0xea,0x1e};
    static std::uint8_t c93[32] = {0x87,0x5d,0x20,0x07,0xcb,0xfe,0x0a,0x80,0xad,0x31,0xb6,0x7b,0x43,0x6d,0xf3,0x01,0xcf,0x6c,0xb7,0xe0,0x83,0x94,0xb6,0xf2,0x36,0x45,0xf5,0x7d,0x31,0x16,0x80,0xaf};
    sm9_fp_from_bytes(a, a93);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a94[32] = {0xa4,0x83,0x75,0x64,0x33,0x77,0xe9,0xa1,0x85,0xe6,0x4c,0x80,0x2c,0x23,0xf3,0x6f,0x6c,0x72,0xff,0x73,0x86,0xba,0x96,0xd2,0xb8,0xfe,0x07,0x4d,0xf3,0xd2,0x6a,0x4b};
    static std::uint8_t c94[32] = {0x80,0x7f,0x06,0x78,0x69,0x1a,0xad,0xdf,0xe1,0x92,0x00,0xf1,0x7c,0x82,0x88,0xf4,0xec,0x62,0xbc,0x40,0x02,0x9d,0x95,0x29,0x5b,0xa0,0x84,0xd8,0x64,0x1b,0xa7,0x14};
    sm9_fp_from_bytes(a, a94);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a95[32] = {0x08,0xe4,0x83,0xc4,0x95,0x52,0xa4,0xad,0x31,0x58,0xb7,0x5a,0xc9,0x6b,0xf3,0x3c,0x2e,0xeb,0xab,0x98,0x64,0xbf,0x9c,0xa5,0x1a,0x3b,0xc0,0x09,0x68,0x69,0x3d,0xf1};
    static std::uint8_t c95[32] = {0x3e,0x3b,0x4a,0x69,0x79,0x0b,0x9f,0x9c,0x66,0x5e,0x65,0xbe,0x5c,0xa8,0x1a,0x76,0xa2,0x13,0xaa,0xeb,0xd5,0x08,0x5f,0xb1,0x1c,0x9e,0x08,0x03,0x0f,0x4d,0x19,0x75};
    sm9_fp_from_bytes(a, a95);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a96[32] = {0x1f,0xd8,0xaa,0x5c,0xe3,0x1c,0x7f,0xc4,0x5e,0xb7,0x85,0xd8,0xf7,0x40,0x9b,0xf2,0x19,0x3c,0xc8,0x84,0x6d,0x1f,0xc2,0x32,0xce,0x3e,0x41,0xf2,0x9c,0x60,0x30,0x63};
    static std::uint8_t c96[32] = {0x91,0x3b,0xb1,0x26,0x0f,0x64,0x03,0x09,0xe3,0x18,0xc8,0xc6,0x3a,0x71,0xd7,0xf6,0xe2,0xe6,0xba,0xb6,0xb3,0x19,0xb1,0xb6,0x49,0x31,0xef,0xde,0x14,0x2c,0x3b,0xb8};
    sm9_fp_from_bytes(a, a96);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a97[32] = {0x38,0x28,0x69,0x64,0xd6,0xcf,0x8a,0x80,0xf4,0x03,0x3c,0xad,0x71,0x9b,0xc9,0xfc,0x70,0xbc,0xe7,0xa6,0x3c,0x65,0x63,0x51,0x61,0x48,0x2c,0xd7,0xe9,0x41,0xc8,0xac};
    static std::uint8_t c97[32] = {0x15,0xb9,0xe8,0xca,0x1e,0x5d,0x0f,0x07,0x26,0xfd,0x02,0xa0,0x07,0x1c,0xc5,0x69,0xb5,0xfd,0xeb,0xed,0xbf,0x9c,0x03,0xa9,0x1d,0xfb,0x40,0xaf,0x9a,0x4b,0xb6,0xfa};
    sm9_fp_from_bytes(a, a97);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a98[32] = {0x13,0x69,0xb4,0x84,0xa4,0x8e,0x38,0x33,0xba,0xb4,0xc7,0x2e,0x42,0x7e,0x24,0xe2,0x5f,0x33,0x1f,0x8d,0x7d,0x98,0xd4,0x72,0xfa,0xa0,0x9a,0x04,0x34,0xf7,0x32,0xd1};
    static std::uint8_t c98[32] = {0x91,0xc9,0xc3,0x24,0x24,0x37,0x3b,0xe6,0x05,0x50,0x74,0x73,0x2e,0xd9,0xe5,0x33,0xcb,0xe1,0xea,0x5f,0x66,0x60,0x08,0x3d,0x1b,0xdf,0x2c,0x80,0x9d,0x81,0x49,0xfd};
    sm9_fp_from_bytes(a, a98);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
    static std::uint8_t a99[32] = {0x95,0x4c,0x3b,0xc0,0x1a,0xb4,0xa6,0x01,0x9c,0x5b,0x5d,0xd9,0x35,0x43,0x80,0x22,0x88,0xe8,0x8b,0x27,0x4b,0x38,0x87,0xd3,0xfe,0xbd,0xb0,0xb1,0x18,0xc6,0x97,0x06};
    static std::uint8_t c99[32] = {0xa0,0xe8,0xac,0xed,0x2b,0x3f,0x7b,0xd3,0xa9,0x31,0x61,0x94,0x09,0x4a,0xe2,0xc1,0x5a,0x91,0x93,0x56,0xf3,0x55,0x44,0x8c,0x01,0x41,0x52,0xe7,0x18,0xad,0xc9,0x7a};
    sm9_fp_from_bytes(a, a99);
    sm9_fp_sqr(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sqr");
    }
}